export class Config {
  id?: number;
  paramKey = '';
  paramValue = '';
  remark = ''

  constructor(data?: Config) {
    data && this.setProps(data);
  }

  setProps(data: Config) {
    (Object.keys(this) as Array<keyof IConfig>).forEach((key) => {
      // @ts-ignore
      this[key] = data[key]
    })
  }
}

export type IConfig = Omit<Config, 'setProps'>